package edu.tjhsst.androidIntranet;

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.DialogInterface.OnClickListener;
import android.net.Uri;

public class BrowserLauncher implements OnClickListener {

	Context c;
	String server;

	public BrowserLauncher(Context c, String server) {
		this.c=c;
		this.server=server;
	}

	@Override
	public void onClick(DialogInterface dialog, int which) {
		Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse
				(server));
		i.addCategory(Intent.CATEGORY_BROWSABLE);
		c.startActivity(i);
	}

}
